interactions = 0
trust = 0 == 0
p = 0

def hunt_choices(round_number, current_food, current_reputation, m,  player_reputations):
	global interactions
	global p
	p = len(player_reputations)
	interactions += p
	hunt_decisions = list()
	for x in player_reputations:
		if m > 3 * p / 2:
			for x in player_reputations:
				if x == 1:
					hunt_decisions.append('h')
				else:
					hunt_decisions.append('s')
		elif trust:
			max = [0]
			maxval = player_reputations[0]
			secmax = [0]
			secmaxval = player_reputations[0]
			hunt_decisions = ['s' for x in player_reputations]
			for i in range(len(player_reputations)):
				if player_reputations[i] > maxval:
					secmax = max
					secmaxval = maxval
					max = [i]
					maxval = player_reputations[i]
				elif player_reputations[i] == maxval:
					max.append(i)
				elif player_reputations[i] > secmaxval:
					secmax = [i]
					secmaxval = player_reputations[i]
				elif player_reputations[i] == secmaxval:
					secmax.append(i)
			for i in max:
				if maxval == 0:
					hunt_decisions[i] = 'h'
			if len(max) == 1:
				for i in secmax:
					if secmaxval == 0:
						hunt_decisions[i] = 'h'
		else:
			if x == 1:
				hunt_decisions.append('h')
			else:
				hunt_decisions.append('s')
	return hunt_decisions

def hunt_outcomes(food_earnings):
	global trust
	food = 0
	for x in food_earnings:
		food += x
	trust = food + p >= 0

def round_end(award, m, number_hunters):
	global trust
	if m <= p and trust:
		trust = number_hunters >= m